(include "gui/component/class.inc")

(def-class 'view 'component)
(dec-method :vtable 'gui/view/vtable)
(dec-method :create 'gui/view/create :static '() '(r0))
(dec-method :init 'gui/view/init)
(dec-method :add_front 'gui/view/add_front :static '(r0 r1) '(r0))
(dec-method :add_back 'gui/view/add_back :static '(r0 r1) '(r0))
(dec-method :sub 'gui/view/sub :static '(r0) '(r0))
(dec-method :hide 'gui/view/hide :static '(r0) '(r0))
(dec-method :to_front 'gui/view/to_front :static '(r0) '(r0))
(dec-method :to_back 'gui/view/to_back :static '(r0) '(r0))
(dec-method :dirty 'gui/view/dirty :static '(r0) '(r0))
(dec-method :add_dirty 'gui/view/add_dirty :static '(r0 r7 r8 r9 r10) '(r0))
(dec-method :clr_opaque 'gui/view/clr_opaque :static '(r0) '(r0))
(dec-method :add_opaque 'gui/view/add_opaque :static '(r0 r7 r8 r9 r10) '(r0))
(dec-method :sub_opaque 'gui/view/sub_opaque :static '(r0 r7 r8 r9 r10) '(r0))
(dec-method :get_relative 'gui/view/get_relative :static '(r0 r1 r7 r8) '(r0 r7 r8))
(dec-method :forward 'gui/view/forward :static '(r0 r1 r2) '(r0))
(dec-method :backward 'gui/view/backward :static '(r0 r1 r2) '(r0))
(dec-method :forward_tree 'gui/view/forward_tree :static '(r0 r1 r2 r3) '(r0))
(dec-method :backward_tree 'gui/view/backward_tree :static '(r0 r1 r2 r3) '(r0))
(dec-method :change 'gui/view/change :static '(r0 r7 r8 r9 r10) '(r0))
(dec-method :change_dirty 'gui/view/change_dirty :static '(r0 r7 r8 r9 r10) '(r0))
(dec-method :hit_tree 'gui/view/hit_tree :static '(r0 r7 r8) '(r0 r1 r7 r8))
(dec-method :find_id 'gui/view/find_id :static '(r0 r1) '(r0 r1))
(dec-method :draw_panel 'gui/view/draw_panel :static '(r0 r1 r2 r3) '(r0))
(dec-method :get_bounds 'gui/view/get_bounds :static '(r0) '(r0 r7 r8 r9 r10))
(dec-method :set_bounds 'gui/view/set_bounds :static '(r0 r7 r8 r9 r10) '(r0))
(dec-method :set_flags 'gui/view/set_flags :static '(r0 r1 r2) '(r0 r1))
(dec-method :forward_callback 'class/obj/null :static '(r0 r1) '(r0))
(dec-method :forward_tree_callback 'class/obj/null :static '(r0 r1) '(r0 r1))

(dec-method :deinit 'gui/view/deinit :override)

(dec-method :add_child 'gui/view/add_back :virtual '(r0 r1) '(r0))
(dec-method :draw 'class/obj/null :virtual '(r0 r1) '(r0))
(dec-method :hit 'gui/view/hit :virtual '(r0 r7 r8) '(r0 r1))
(dec-method :pref_size 'gui/view/pref_size :virtual '(r0) '(r0 r9 r10))
(dec-method :layout 'class/obj/null :virtual '(r0) '(r0))
(dec-method :event 'gui/view/event :virtual '(r0 r1) '(r0))
(dec-method :mouse_down 'class/obj/null :virtual '(r0 r1) '(r0))
(dec-method :mouse_up 'class/obj/null :virtual '(r0 r1) '(r0))
(dec-method :mouse_move 'class/obj/null :virtual '(r0 r1) '(r0))
(dec-method :mouse_hover 'class/obj/null :virtual '(r0 r1) '(r0))
(dec-method :key_down 'class/obj/null :virtual '(r0 r1) '(r0))
(dec-method :key_up 'class/obj/null :virtual '(r0 r1) '(r0))
(dec-method :action 'class/obj/null :virtual '(r0 r1) '(r0))

(dec-method :lisp_create 'gui/view/lisp_create :static '(r0 r1) '(r0 r1))
(dec-method :lisp_sub 'gui/view/lisp_sub :static '(r0 r1) '(r0 r1))
(dec-method :lisp_hide 'gui/view/lisp_hide :static '(r0 r1) '(r0 r1))
(dec-method :lisp_add_child 'gui/view/lisp_add_child :static '(r0 r1) '(r0 r1))
(dec-method :lisp_add 'gui/view/lisp_add :static '(r0 r1) '(r0 r1))
(dec-method :lisp_add_back 'gui/view/lisp_add_back :static '(r0 r1) '(r0 r1))
(dec-method :lisp_pref_size 'gui/view/lisp_pref_size :static '(r0 r1) '(r0 r1))
(dec-method :lisp_change 'gui/view/lisp_change :static '(r0 r1) '(r0 r1))
(dec-method :lisp_change_dirty 'gui/view/lisp_change_dirty :static '(r0 r1) '(r0 r1))
(dec-method :lisp_add_opaque 'gui/view/lisp_add_opaque :static '(r0 r1) '(r0 r1))
(dec-method :lisp_sub_opaque 'gui/view/lisp_sub_opaque :static '(r0 r1) '(r0 r1))
(dec-method :lisp_set_flags 'gui/view/lisp_set_flags :static '(r0 r1) '(r0 r1))
(dec-method :lisp_add_dirty 'gui/view/lisp_add_dirty :static '(r0 r1) '(r0 r1))
(dec-method :lisp_dirty 'gui/view/lisp_dirty :static '(r0 r1) '(r0 r1))
(dec-method :lisp_layout 'gui/view/lisp_layout :static '(r0 r1) '(r0 r1))
(dec-method :lisp_event 'gui/view/lisp_event :static '(r0 r1) '(r0 r1))
(dec-method :lisp_find_id 'gui/view/lisp_find_id :static '(r0 r1) '(r0 r1))

(def-bit 'view_flag)
	(bit 'solid 'opaque 'dirty_all 'at_back)
(def-bit-end)

(def-struct 'view 'component)
	(offset 'start)
	(struct 'node 'ln_node)
	(struct 'list 'lh_list)
	(ptr 'dirty_region 'opaque_region 'ctx_node)
	(uint 'last_buttons 'flags)
	(int 'ctx_x 'ctx_y 'x 'y 'w 'h)
(def-struct-end)
